<%--
    User: limeng
    Date: 16/6/6
    Time: 上午9:29
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3>待立案提案</h3>
        <label style="width: 40%">
            开始时间
            <div class='input-group date' id='dp_startTime'>
                <input type='text' class="form-control"
                       ng-model="searchMap.startTime"/>
                <span class="input-group-addon">
                    <span class="fa fa-calendar"></span>
                </span>
            </div>
            <script>
                $(function () {
                    $('#dp_startTime').datepicker({
                        format: 'yyyy-mm-dd',
                        language : 'zh-CN'
                    });
                });
            </script>
        </label>
        <label style="width: 40%">
            结束时间
            <div class='input-group date' id='dp_endTime'>
                <input type='text' class="form-control"
                       ng-model="searchMap.endTime"/>
                <span class="input-group-addon">
                    <span class="fa fa-calendar"></span>
                </span>
            </div>
            <script>
                $(function () {
                    $('#dp_endTime').datepicker({
                        format: 'yyyy-mm-dd',
                        language : 'zh-CN'
                    });
                });
            </script>
        </label>
        <button class="btn btn-primary pull-right"
                ng-click="updateContent()"
                style="margin-top: 16px">
            <i class="fa fa-search"></i> 搜索
        </button>
    </div>
    <div class="panel-body" style="min-height: 500px">
        <table class="table table-bordered table-hover text-center">
            <thead>
            <tr>
                <td width="40%">提案标题</td>
                <td width="10%">类型</td>
                <td width="10%">状态</td>
                <td width="25%">修改时间</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="proposal in proposals | orderBy:'id':true">
                <td>
                    <a ng-href="#/registProposal/{{proposal.id}}">
                        {{proposal.title}}
                    </a>
                </td>
                <td>{{enums.proposalType[proposal.proposalType]}}</td>
                <td>{{enums.proposalState[proposal.proposalState]}}</td>
                <td>{{proposal.updateTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="panel-footer">
        <span>当前在第{{pageNo}}页,共{{pageCount}}页</span>
        <div class="btn-group">
            <button class="btn btn-primary" type="button" ng-click="previousPage()">上一页</button>
            <button class="btn btn-primary" type="button" ng-click="nextPage()">下一页</button>
        </div>
        <div class="pull-right">
            <span>
                每页显示
                <input type="text"
                       ng-model="pageSize"
                       style="width: 25px">
                行
            </span>&nbsp;
            <span>
                跳转到第
                <input type="text"
                       ng-model="inputPageNo"
                       style="width: 20px">
                页
            </span>
            <button class="btn btn-primary" type="button" ng-click="jumpPage()">跳转</button>
        </div>
    </div>
</div>